package service;

import bean.User;
import dao.UserDao;

public class UserService {
	
	UserDao userDao = new UserDao();
	
	public boolean selectByUserName(String userName) {
		boolean isExits =  userDao.selectByUserName(userName);
		return isExits;
	}

	public int insterByUser(User user) {
		int n = userDao.insterByUser(user);
		return n;
	}

	public User login(String userName, String password) {
		return userDao.selectByUserNameAndPassword(userName,password);
	}


}
